<template>
  <div id="app">
    <w-p-d-f v-if="pofUrl" @error="error" :url="pofUrl"/>
  </div>
</template>

<script lang="ts">
import WPDF from '@/components/global/PDF/index.vue';
import { Component, Vue } from 'vue-property-decorator';
import { QueryString } from 'yb-tool';

@Component({
  components: {
    WPDF,
  },
})
export default class App extends Vue {
  private pofUrl = '';

  private mounted() {
    const url = (QueryString.parse() as any).file;
    this.pofUrl = url
      ? url
      : 'https://cdn.wangyabin.top/Extension/pdf/web/404.pdf';
  }
}
</script>
<style>
</style>
